package com.dominator.repository;

import javax.annotation.Resource;

import com.dominator.mybatis.dao.T_order_noticeDao;
import com.dominator.mybatis.dao.T_order_noticePO;
import com.dominator.utils.dao.JdbcHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.dominFramework.core.dao.SqlDao;
import com.dominFramework.core.typewrap.Dto;
import com.dominFramework.core.typewrap.Dtos;

@Repository
public class DaoPay {
	
	@Resource
	JdbcHelper jh;
	
	@Autowired
	SqlDao sqlDao;
	
	@Autowired
	T_order_noticeDao orderNoticeDao;
	
	
	/**
	 * 添加
	 * @param record
	 * @return
	 */
	public int insert(T_order_noticePO record){
		return orderNoticeDao.insert(record);
	}
	
	
	/**
	 * 查询订单信息
	 * @param
	 * @return
	 */
	public T_order_noticePO selectBySn(String sn){
		Dto qDto=Dtos.newDto("sn", sn);
		T_order_noticePO t_order_noticePO=(T_order_noticePO) sqlDao.selectOne("OrderNotice.selectBySn", qDto);
		return t_order_noticePO;
	}
	
	/**
	 * 修改订单信息
	 * @param record
	 * @return
	 */
	public int updateOrder(T_order_noticePO record){
		return orderNoticeDao.updateByKey(record);
	}

	

}
